package org.locker.domain.bo;

import org.locker.domain.Withdraw;
import org.locker.common.mybatis.core.domain.BaseEntity;
import org.locker.common.core.validate.*;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 提现业务对象 lk_withdraw
 *
 * @author winnie
 * @date 2023-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Withdraw.class, reverseConvertGenerate = false)
public class WithdrawBo extends BaseEntity {

    /**
     * 提现ID
     */
    @NotNull(message = "提现ID不能为空", groups = { EditGroup.class })
    private Long withdrawId;

    /**
     * 提现类型; self:用户提现, system:系统提现
     */
    private String withdrawType;


    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { EditGroup.class })
    private Long userId;

    /**
     * 提现单号
     */
    @NotBlank(message = "提现单号不能为空", groups = { EditGroup.class })
    private String withdrawNo;

    /**
     * 微信交易流水号
     */
    @NotBlank(message = "微信交易流水号不能为空", groups = { EditGroup.class })
    private String transactionNo;

    /**
     * 交易金额
     */
    @NotNull(message = "交易金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 交易成功时间
     */
    @NotNull(message = "交易成功时间不能为空", groups = { EditGroup.class })
    private Date withdrawTime;

    /**
     * 状态：withdrawing 提现中,withdraw_success 退款成功,fail 用户取消,交易失败(),
     */
    @NotBlank(message = "状态：withdrawing 提现中,withdraw_success 退款成功,fail 用户取消,交易失败(),不能为空", groups = { EditGroup.class })
    private String withdrawStatus;

    /**
     * 退款备注
     */
    @NotBlank(message = "退款备注不能为空", groups = { EditGroup.class })
    private String withdrawRemark;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { EditGroup.class })
    private String remark;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 用户名称
     */
    private String userName;


}
